home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java for 3D & VRML Worlds
/
Java for 3d and VRML Worlds.iso
/
examples
/
chap04
/
FloatingAgent.wrl
< prev
next >
Wrap
Text File
|
1996-10-14
|
540b
|
28 lines
#VRML V2.0 utf8
#
# an agent is floating randomly.
#
DEF AGENT_TIME TimeSensor{
loop TRUE
cycleInterval 0.1
}
# floating agent
DEF AGENT Transform{
children[
# a model of agent.
Inline{url "ManDetailed.wrl"}
]
}
DEF AGENT_SCRIPT Script{
url "FloatingAgent.class"
eventIn SFTime interval
eventOut SFVec3f setAgentPosition
}
ROUTE AGENT_TIME.cycleTime TO AGENT_SCRIPT.interval
ROUTE AGENT_SCRIPT.setAgentPosition TO AGENT.set_translation